/**
 * 神州信息(2012)
 */
package net.abbp.lotter.ssq.data;

/**
 * 双色球数据开奖号码
 * 
 * @version 1.0
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since I500S 1.0
 * 
 *        Date：2012-2-21
 */
public class Item {
	private String no;
	private String date;
	private int id1;
	private int id2;
	private int id3;
	private int id4;
	private int id5;
	private int id6;

	public Item(String no, String date, int id1, int id2, int id3, int id4, int id5, int id6) {
		this.no = no;
		this.date = date;
		this.id1 = id1;
		this.id2 = id2;
		this.id3 = id3;
		this.id4 = id4;
		this.id5 = id5;
		this.id6 = id6;
	}

	/**
	 * 固定格式 2010075,2010-07-01,5,9,12,13,15,22
	 * 
	 * @param values
	 *            数据集
	 */
	public Item(String valueItem) {
		String[] items = valueItem.split(",");

		this.no = items[0];
		this.date = items[1];
		this.id1 = Integer.parseInt(items[2]);
		this.id2 = Integer.parseInt(items[3]);
		this.id3 = Integer.parseInt(items[4]);
		this.id4 = Integer.parseInt(items[5]);
		this.id5 = Integer.parseInt(items[6]);
		this.id6 = Integer.parseInt(items[7]);
	}

	/**
	 * @return 获取总数
	 */
	public int getSum() {
		return this.id1 + this.id2 + this.id3 + this.id4 + this.id5 + this.id6;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getNo() {
		return no;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getDate() {
		return date;
	}

	public void setId1(int id1) {
		this.id1 = id1;
	}

	public int getId1() {
		return id1;
	}

	public void setId2(int id2) {
		this.id2 = id2;
	}

	public int getId2() {
		return id2;
	}

	public void setId3(int id3) {
		this.id3 = id3;
	}

	public int getId3() {
		return id3;
	}

	public void setId4(int id4) {
		this.id4 = id4;
	}

	public int getId4() {
		return id4;
	}

	public void setId5(int id5) {
		this.id5 = id5;
	}

	public int getId5() {
		return id5;
	}

	public void setId6(int id6) {
		this.id6 = id6;
	}

	public int getId6() {
		return id6;
	}
}
